package com.lw.behavioral.strategy;

//实体对象
public class Context {
   private Strategy strategy;//策略属性

   //构造
   public Context(Strategy strategy){
      this.strategy = strategy;
   }

   //执行策略
   public int executeStrategy(int num1, int num2){
      return strategy.doOperation(num1, num2);
   }
}